Skip to content

Conversation

yashpatel2911
Copy link

@yashpatel2911 yashpatel2911 commented Jan 2, 2021

In the Exercise of the NumPy File in the task "Given the X NumPy matrix, show the last two elements on the last two rows", your mentioned answer is X[2:,2:] which is wrong instead the answer is X[-2:,-2:] which will give you definitely last two rows of last elements. What if we have 6 rows and 6 cols? For that The output of X[2:, 2:] will be an array shape of (4,4) instead of (2, 2).

@yashpatel2911 yashpatel2911 changed the title Updating the Numpy Excercise File Update in the Numpy Excercise File Jan 2, 2021
@AzureByte
Copy link

Noticed this erratum too. Apart from changing the python version of the notebook, fix looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants